#define _CRT_SECURE_NO_WARNINGS 1

#include "List.h"


void test1()
{
	ListNode* phead = LNInit();
	LNPushBack(phead, 1);
	LNPushBack(phead, 2);
	LNPushBack(phead, 3);
	LNPushBack(phead, 4);
	LNPrint(phead);

	/*LNPushFront(phead, 10);
	LNPushFront(phead, 20);
	LNPushFront(phead, 30);
	LNPushFront(phead, 40);
	LNPrint(phead);*/

	LNDestroy(phead);
	phead = NULL;
}


void test2()
{
	ListNode* phead = LNInit();
	LNPushBack(phead, 1);
	LNPushBack(phead, 2);
	LNPushBack(phead, 3);
	LNPushBack(phead, 4);
	LNPushBack(phead, 5);
	LNPushBack(phead, 6);
	LNPrint(phead);

	LNPopBack(phead);
	LNPopBack(phead);
	LNPrint(phead);

	LNPopFront(phead);
	LNPopFront(phead);
	LNPrint(phead);

	LNDestroy(phead);

}


void test3()
{
	ListNode* phead = LNInit();
	LNPushBack(phead, 1);
	LNPushBack(phead, 2);
	LNPushBack(phead, 3);
	LNPushBack(phead, 4);
	LNPushBack(phead, 5);
	LNPushBack(phead, 6);
	LNPrint(phead);

	ListNode* pos = LNFind(phead,4);
	LNInsert(pos, 40);
	LNPrint(phead);

	LNErase(pos);
	LNPrint(phead);

	LNDestroy(phead);

}

int main()
{
	
	test1();
	//test2();
	//test3();
	return 0;
}